package com.iqiyi.pps.epg.core.model.remind;


import com.iqiyi.pps.epg.core.model.base.BaseEntity;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created with IntelliJ IDEA.
 * User: jinlin
 * Date: 15-7-28
 * Time: 下午5:28
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "mail_remind")
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.NONE)
public class MailRemind extends BaseEntity {
    protected Long id;
    private String title;    //标题
    private String tos;       //收件人
    private String content;   //内容
    private Integer period;   //每隔至少多长时间才允许发送一次（分钟）
    private Timestamp endTime; //在此时间前不允许重复发送
    private String type;
    private String entityId;   //type+entityId作为基本单位

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getId() {
        return id;
    }

    @Override
    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTos() {
        return tos;
    }

    public void setTos(String tos) {
        this.tos = tos;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getPeriod() {
        return period;
    }

    public void setPeriod(Integer period) {
        this.period = period;
    }

    public Timestamp getEndTime() {
        return endTime;
    }

    public void setEndTime(Timestamp endTime) {
        this.endTime = endTime;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getEntityId() {
        return entityId;
    }

    public void setEntityId(String entityId) {
        this.entityId = entityId;
    }
}
